package com.liu.mybatisplusdemo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liu.mybatisplusdemo.entity.Person;
import com.liu.mybatisplusdemo.mapper.PersonMapper;
import com.liu.mybatisplusdemo.service.PersonService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements PersonService {

    @Resource
    private PersonMapper personMapper;

    @Override
    public IPage<Person> findPage(Page<Person> page, QueryWrapper<Person> queryWrapper) {
        return baseMapper.findPage(page,queryWrapper);
    }

    @Override
    public List<Person> findALL() {
        return personMapper.findALL();
    }
}
